package android.src.main.km_printer_plugin.bean;


import java.io.Serializable;

public class BltDevice implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 蓝牙名称 */
    String name;

    /** 蓝牙地址 */
    String address;

    public BltDevice() {
    }

    public BltDevice(String name, String address) {
        this.name = name;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Override
    public boolean equals(Object obj) {

        if (obj instanceof BltDevice) {
            return address.equals(((BltDevice) obj).getAddress());
        }
        return false;
    }

    @Override
    public int hashCode() {
        return address.hashCode();
    }

    @Override
    public String toString() {
        return address;
    }
}
